Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tediousjs/connection-string

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tediousjs/connection-string

SQL ConnectionString parser

  • 0.5.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
817K
increased by87.9%
Maintainers
2
Weekly downloads
 
Created

What is @tediousjs/connection-string?

@tediousjs/connection-string is a utility package designed to parse and format connection strings for use with the Tedious library, which is a TDS (Tabular Data Stream) protocol implementation for Node.js. This package helps in managing and manipulating connection strings for SQL Server databases.

What are @tediousjs/connection-string's main functionalities?

Parsing Connection Strings

This feature allows you to parse a connection string into a configuration object that can be used with the Tedious library. The `parseConnectionString` function takes a connection string and returns an object with the parsed details.

const { parseConnectionString } = require('@tediousjs/connection-string');
const connectionString = 'Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;';
const config = parseConnectionString(connectionString);
console.log(config);

Formatting Connection Strings

This feature allows you to format a configuration object into a connection string. The `formatConnectionString` function takes a configuration object and returns a connection string that can be used to connect to a SQL Server database.

const { formatConnectionString } = require('@tediousjs/connection-string');
const config = {
  server: 'myServerAddress',
  authentication: {
    type: 'default',
    options: {
      userName: 'myUsername',
      password: 'myPassword'
    }
  },
  options: {
    database: 'myDataBase'
  }
};
const connectionString = formatConnectionString(config);
console.log(connectionString);

Other packages similar to @tediousjs/connection-string

Keywords

FAQs

Package last updated on 09 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc